<?
class Sendmail extends MY_Controller
{
	
function __construct() {
        parent::__construct();
        
    }
    
	function index()
	{
		$config = Array(
  'protocol' => 'smtp',
  'smtp_host' => 'smtp.angelbeautycali.com',
  //'smtp_port' => 465,
  'smtp_user' => 'system@angelbeautycali.com', // change it to yours
  'smtp_pass' => 'System2012', // change it to yours
  'mailtype' => 'html',
  'charset' => 'utf-8',
  'wordwrap' => TRUE
		);

		$this->load->library('email', $config);
		$this->email->set_newline("\r\n");
		$this->email->from('pmkhoi@gmail.com'); // change it to yours
		$this->email->to('khoi.pham@kns.com.vn'); // change it to yours
		$this->email->subject('Email using Gmail.');
		$this->email->message('Working fine ! !');

		if($this->email->send())
		{
			echo 'Email sent.';
		}
		else
		{
			show_error($this->email->print_debugger());
		}
	}
}?>